home *** CD-ROM | disk | FTP | other *** search
- property pFileName2
- global gSavedList, gbPC, myFile, captionPath, captions
-
- on startMovie
- myFile = new(xtra("fileio"))
- end
-
- on stopMovie
- myFile = 0
- end
-
- on addList me, flashstring
- flashstring2 = convertFile(flashstring)
- gSavedList.add(flashstring2)
- end
-
- on addTarget me, flashstring
- put flashstring
- member("target").text = flashstring
- end
-
- on quitProgram
- _player.quit()
- end
-
- on flashDownload me, flashstring
- if gSavedList.count > 0 then
- if gbPC then
- captionPath = "Documents\"
- else
- captionPath = "Documents:"
- end if
- if not (flashstring = EMPTY) then
- captions = flashstring
- end if
- downloadFiles("DT")
- else
- alert("There are currently no files selected for download!")
- quitProgram()
- end if
- end
-
- on captionSave
- dtPath = baSysFolder("desktop")
- if dtPath = EMPTY then
- alert("Error finding desktop folder")
- go("exit")
- end if
- destRoot = dtPath & member("target").text.line[1]
- if gbPC then
- destRoot = destRoot & "\"
- else
- destRoot = destRoot & ":"
- end if
- if not baFolderExists(destRoot) then
- res = baCreateFolder(destRoot)
- end if
- destRoot = destRoot & captionPath
- if not baFolderExists(destRoot) then
- res = baCreateFolder(destRoot)
- end if
- if objectp(myFile) then
- myFile = 0
- end if
- mySaveString = captions
- myFile = new(xtra("fileio"))
- dest = destRoot & "Captions.doc"
- filecheck = baFileExists(dest)
- if filecheck = 0 then
- createFile(myFile, dest)
- end if
- openfile(myFile, dest, 0)
- setPosition(myFile, getLength(myFile))
- writeString(myFile, mySaveString)
- closeFile(myFile)
- myFile = 0
- end
-